import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/get?${stringify(params)}`);
}


export async function insertForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProOrg(params = {}) {
    return request(`/${webpath}/web/api/service/proorg/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}